import React, { Component } from "react";

export default class Count extends Component<any,any> {
  constructor(props:any){
    super(props)
    this.state ={count:0}

  }
  addCount(){
    console.log("hahaha")
    this.setState({count:this.state.count + 1})
  }
  render(){
    return (
      <div className="App">
      <div>次数:{this.state.count}</div>
      <button onClick={this.addCount.bind(this)}>增加次数</button>
    </div>
    )
  }
}
